package org.semanticflash.rdf.io.rdfxml
{
	
	
	import org.semanticflash.rdf.values.IRI;
	import org.semanticflash.rdf.vocab.Vrdf;
	
	
	
	/**
	 * 
	 * 
	 * @author aldo.bucchi@gmail.com
	 * 
	 */	
	public class RDFXMLParserUtil
	{



		/**
		 * 
		 * KLUDGE
		 * 
		 * @param xml
		 * @return 
		 * 
		 */
		public static function isRDFXML( xml:XML ):Boolean
		{
			var str:String = Vrdf.ns.toString( ) + "::RDF"; 
			return ( xml.name( ).toString( ) == str );
		}
		
		
		
		
		
		
		internal static function enumerateLineElementsWithinContainer( xmlNode:XML ):void
		{
			var lis:XMLList = xmlNode.elements();
			var i:int=1;
			for each ( var li:XML in lis )
			{
				if ( li.localName().toString().toLowerCase() != "li" )
				{		// elements are already enumerated or there is a syntax error.
						// whatever... we won't change anything
					return; 
				}
				li.setLocalName( "_" + (i++) );
			}
		}
		




		internal static function isConsideredAPropertyAttribute( attrIRI:IRI ):Boolean
		{
			return nonPropertyAttributes.indexOf( attrIRI ) == -1;
		}

		private static var nonPropertyAttributes:Array = [ Vrdf._about, Vrdf._resource, Vrdf._ID, Vrdf._nodeID ];

				
		
	}
	

}